<style type="text/css">
	@media (max-width: 375px) {
		.edit-form tr td input {
			width: 100%;
		}

		.edit-form tr th:first-child,
		.edit-form tr td:first-child {
			width: 20%;
		}

		.edit-form tr th:nth-last-of-type(-n+2),
		.edit-form tr td:nth-last-of-type(-n+2) {
			display: none;
		}
	}

	.edit-form table>tbody>tr td a.btn-delcfg {
		visibility: hidden;
	}

	.edit-form table>tbody>tr:hover td a.btn-delcfg {
		visibility: visible;
	}
</style>
<div class="alert alert-success-light">
	<i class="fa fa-warning"></i> 温馨提示：1.不使用云打印或没有和快递公司签约，云打印配置、面单参数无需配置；2.IM欢迎消息留空则表示不启用，没有任何聊天消息默认发送
</div>
<div class="panel panel-default panel-intro">
	<div class="panel-heading">
		<ul class="nav nav-tabs">
			{foreach name="typeList" item="vo"}
			<li {empty name="type"} {eq name="key" value="freight"}class="active"{/eq} {else /} {eq name="type" value="$key"}class="active"{/eq} {/empty}> <a href="#{$key}" data-toggle="tab">{$vo}</a></li>
			{/foreach}
		</ul>
	</div>

	<div class="panel-body">
		<div id="myTabContent" class="tab-content">
			<div class="tab-pane fade {empty name='type'} active in {else /} {eq name='type' value='freight'}active in{/eq} {/empty}" id="freight">
				<div class="widget-body no-padding">
					<form id="freight-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/index')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>店铺类目样式</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												{:Form::radios('row[category_style]', ['1'=>'一级类目 - 大图', '2'=>'一级类目 - 九宫格', '3'=>'二级类目', '4'=>'多级类目样式'], is_array($row) ? $row.category_style : 3, ['data-rule'=>'required'])}
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>运费组合策略</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												{:Form::radios('row[freight]', ['0'=>'运费叠加', '1'=>'以最低结算', '2'=>'以最高结算'], !empty($row.freight) ? $row.freight : 2, ['data-rule'=>'required'])}
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>IM 欢迎消息</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<textarea name="row[welcome]" class="form-control" rows="5" data-tip="空,表示不使用欢迎消息">{$row.welcome|htmlentities}</textarea>
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='kuaidi'}active in{/eq}{/notempty}" id="kuaidi">
				<div class="widget-body no-padding">
					<form id="kuaidi-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/index')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>是否开启云打印</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												{:Form::switcher('row[iscloud]', $row.iscloud, ['color'=>'success', 'yes'=>'1', 'no'=>'0'])}
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>是否云打印自动发货</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												{:Form::switcher('row[isauto]', $row.isauto, ['color'=>'success', 'yes'=>'1', 'no'=>'0'])}
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>Secret</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[secret]" value="{$row.secret|htmlentities}" class="form-control" data-rule="" data-tip="快递100 Secret 参数">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>授权KEY</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[key]" value="{$row.key|htmlentities}" class="form-control" data-rule="" data-tip="快递100 授权KEY参数">
											</div>
											<div class="col-sm-4"></div>
										</div>
								
									</td>
								</tr>
								<tr>
									<td>面单账号</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[partnerId]" value="{$row.partnerId|htmlentities}" class="form-control" data-rule="" data-tip="快递公司的电子面单账号或月结账号">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>面单密码</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[partnerKey]" value="{$row.partnerKey|htmlentities}" class="form-control" data-rule="" data-tip="快递公司分配的电子面单密码">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='facesheet'}active in{/eq}{/notempty}" id="facesheet">
				<div class="widget-body no-padding">
					<form id="facesheet-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/edit')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>打印设备码</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[siid]" value="{$row.siid|htmlentities}" class="form-control" data-rule="required" data-tip="ACMD893784">
											</div>
											<div class="col-sm-4"></div>
										</div>
								
									</td>
								</tr>
								<tr>
									<td>模板ID</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[tempid]" value="{$row.tempid|htmlentities}" class="form-control" data-rule="required" data-tip="如：ad8470013eb64c979120ca75c6bf7bae">
											</div>
											<div class="col-sm-4"></div>
										</div>
								
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='mailing'}active in{/eq}{/notempty}" id="mailing">
				<div class="widget-body no-padding">
					<form id="mailing-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/index')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>姓名(店铺名)</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[sendName]" value="{$row.sendName|htmlentities}" class="form-control" data-tip="张三" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>固话/手机</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="number" name="row[sendPhoneNum]" value="{$row.sendPhoneNum|htmlentities}" class="form-control" data-tip="" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>寄件地址</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<textarea name="row[sendAddr]" class="form-control" rows="5" data-tip="" data-rule="required">{$row.sendAddr|htmlentities}</textarea>
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='return'}active in{/eq}{/notempty}" id="return">
				<div class="widget-body no-padding">
					<form id="return-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/index')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>姓名(店铺名)</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[returnName]" value="{$row.returnName|htmlentities}" class="form-control" data-tip="张三" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>固话/手机</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="number" name="row[returnPhoneNum]" value="{$row.returnPhoneNum|htmlentities}" class="form-control" data-tip="请输入您的固话或手机号" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>退货地址</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<textarea name="row[returnAddr]" class="form-control" rows="5" data-tip="" data-rule="required">{$row.returnAddr|htmlentities}</textarea>
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
